for(i=0; i<file_num; i++) if (LIST_GET(name_list, i) == NULL) total_deleted ++;
if (DeleteFromIndex) {
if (total_size <= 0) {
fprintf(STATFILE, "#of files being deleted = %d, Total #of files = %d\n", total_deleted, file_num - total_deleted);
printf("\n#of files being deleted = %d, Total #of files = %d\n", total_deleted, file_num - total_deleted); /* the only output the user sees */
}
else {
fprintf(STATFILE, "Size of files being indexed = %d B, #of files being deleted = %d, Total #of files = %d\n", total_size, total_deleted, file_num - total_deleted);
printf("\nSize of files being indexed = %d B, #of files being deleted = %d, Total #of files = %d\n", total_size, total_deleted, file_num - total_deleted); /* the only output the user sees */
}
}
else {
fprintf(STATFILE, "Size of files being indexed = %d B, Total #of files = %d\n", total_size, file_num);
printf("\nSize of files being indexed = %d B, Total #of files = %d\n", total_size, file_num); /* the only output the user sees */
}
#ifdef SW_DEBUG
for (i=0; i<file_num; i++)
printf("name_list[%d] = %s, size=%d\n", i, LIST_GET(name_list, i), LIST_GET(size_list, i));
#endif /*SW_DEBUG*/
for (i=0; i<num_inc; i++) {
#if BG_DEBUG
memory_usage -= strlen(inc) + 2;
#endif /*BG_DEBUG*/
my_free(inc[i], 0);
}
for (i=0; i<num_pat; i++) {
#if BG_DEBUG
memory_usage -= strlen(pat) + 2;
#endif /*BG_DEBUG*/
my_free(pat[i], 0);
}
/* Life (algorithm) is much simpler, but encode/decode (I/O) is more complex: the p_table is irrelevant */
for(i=0; i<file_num; i++) if (LIST_GET(name_list, i) == NULL) total_deleted ++;
if (DeleteFromIndex) {
if (total_size <= 0) {
fprintf(STATFILE, "#of files being deleted = %d, Total #of files = %d\n", total_deleted, file_num - total_deleted);
printf("\n#of files being deleted = %d, Total #of files = %d\n", total_deleted, file_num - total_deleted); /* the only output the user sees */
}
else {
fprintf(STATFILE, "Size of files being indexed = %d B, #of files being deleted = %d, Total #of files = %d\n", total_size, total_deleted, file_num - total_deleted);
printf("\nSize of files being indexed = %d B, #of files being deleted = %d, Total #of files = %d\n", total_size, total_deleted, file_num - total_deleted); /* the only output the user sees */
}
}
else {
fprintf(STATFILE, "Size of files being indexed = %d B, Total #of files = %d\n", total_size, file_num);
printf("\nSize of files being indexed = %d B, Total #of files = %d\n", total_size, file_num); /* the only output the user sees */
}
#ifdef SW_DEBUG
for (i=0; i<file_num; i++)
printf("name_list[%d] = %s, size=%d\n", i, LIST_GET(name_list, i), LIST_GET(size_list, i));